package com.ssy.lingxi.order.model.dto;

import java.io.Serializable;
import java.util.Objects;

/**
 * 采购会员、供应会员作为参数DTO
 * @author 万宁
 * @version 2.0.0
 * @date 2022-01-06
 */
public class OrderMemberDTO implements Serializable {
    private static final long serialVersionUID = 5900388284953073282L;

    public OrderMemberDTO(Long buyerMemberId, Long buyerRoleId, Long vendorMemberId, Long vendorRoleId) {
        this.buyerMemberId = buyerMemberId;
        this.buyerRoleId = buyerRoleId;
        this.vendorMemberId = vendorMemberId;
        this.vendorRoleId = vendorRoleId;
    }

    /**
     * 采购会员Id
     */
    private Long buyerMemberId;

    /**
     * 采购会员角色Id
     */
    private Long buyerRoleId;

    /**
     * 供应会员Id
     */
    private Long vendorMemberId;

    /**
     * 供应会员角色Id
     */
    private Long vendorRoleId;

    public Long getBuyerMemberId() {
        return buyerMemberId;
    }

    public void setBuyerMemberId(Long buyerMemberId) {
        this.buyerMemberId = buyerMemberId;
    }

    public Long getBuyerRoleId() {
        return buyerRoleId;
    }

    public void setBuyerRoleId(Long buyerRoleId) {
        this.buyerRoleId = buyerRoleId;
    }

    public Long getVendorMemberId() {
        return vendorMemberId;
    }

    public void setVendorMemberId(Long vendorMemberId) {
        this.vendorMemberId = vendorMemberId;
    }

    public Long getVendorRoleId() {
        return vendorRoleId;
    }

    public void setVendorRoleId(Long vendorRoleId) {
        this.vendorRoleId = vendorRoleId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }

        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        OrderMemberDTO that = (OrderMemberDTO) o;
        return Objects.equals(buyerMemberId, that.buyerMemberId) &&
                Objects.equals(buyerRoleId, that.buyerRoleId) &&
                Objects.equals(vendorMemberId, that.vendorMemberId) &&
                Objects.equals(vendorRoleId, that.vendorRoleId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(buyerMemberId, buyerRoleId, vendorMemberId, vendorRoleId);
    }
}
